package com.nintendo;

import com.nintendo.tool.DateTool;
import com.nintendo.tool.EbookTool;
import com.nintendo.tool.EmailTool;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@MapperScan("com.nintendo.mapper")
@SpringBootApplication
public class MCPServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(MCPServerApplication.class, args);
    }
    @Bean
    public ToolCallbackProvider registerTools(EbookTool ebookTool,DateTool dateTool, EmailTool emailTool) {
        return MethodToolCallbackProvider.builder().toolObjects(ebookTool,dateTool,emailTool).build();
    }
}
